const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: "./", // 根域上下文目录
  outputDir: "teasale", // 构建输出目录，可不写
  assetsDir: "assets", // 静态资源目录 (js, css, img, fonts)，可不写
  devServer: {
    // Paths
    // assetsSubDirectory: "static",
    // assetsPublicPath: "./",
    proxy: {
      '/': {
        ws:false,
        target: 'http://localhost:8666',
        changeOrigin: true,
        pathRewrite: { '^/': '' }
      }
    },

    // // Various Dev Server settings
    // host: "localhost", // can be overwritten by process.env.HOST
    port: 8321, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
    // autoOpenBrowser: false,
    // errorOverlay: true,
    // notifyOnErrors: true,
    // poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-

    // /**
    //  * Source Maps
    //  */

    // // https://webpack.js.org/configuration/devtool/#development
    // devtool: "cheap-module-eval-source-map",

    // // If you have problems debugging vue-files in devtools,
    // // set this to false - it *may* help
    // // https://vue-loader.vuejs.org/en/options.html#cachebusting
    // cacheBusting: true,

    // cssSourceMap: true,
  },
});
